name: 'etcd-{{ ansible_hostname | lower }}'  
data-dir: {{ etcd_data }}
wal-dir: {{ etcd_data }}/wal
snapshot-count: 5000
heartbeat-interval: 100
election-timeout: 1000
quota-backend-bytes: 0
listen-peer-urls: 'https://{{ ansible_default_ipv4.address }}:2380'  
listen-client-urls: 'https://{{ ansible_default_ipv4.address }}:2379,http://127.0.0.1:2379' 
max-snapshots: 3
max-wals: 5
cors:
initial-advertise-peer-urls: 'https://{{ ansible_default_ipv4.address }}:2380' 
advertise-client-urls: 'https://{{ ansible_default_ipv4.address }}:2379'  
discovery:
discovery-fallback: 'proxy'
discovery-proxy:
discovery-srv:
initial-cluster: '{% set nodes = [] %}
{% for item in groups["etcd"] %}
{% set node_name = "etcd-" + item %}
{% set node_inventory_hostname = hostvars[item].inventory_hostname | lower %}
{% set node_ansible_host = hostvars[item].ansible_host %}
{% set node_description = "etcd-" + node_inventory_hostname + "=https://" + node_ansible_host + ":2380" %}
{{ nodes.append(node_description) }}{% endfor %}
{{ nodes|join(",") }}'
initial-cluster-token: 'etcd-k8s-cluster'
initial-cluster-state: 'new'
strict-reconfig-check: false
enable-v2: true
enable-pprof: true
proxy: 'off'
proxy-failure-wait: 5000
proxy-refresh-interval: 30000
proxy-dial-timeout: 1000
proxy-write-timeout: 5000
proxy-read-timeout: 0
client-transport-security:
  cert-file: '/etc/kubernetes/pki/etcd/etcd.pem'
  key-file: '/etc/kubernetes/pki/etcd/etcd-key.pem'
  client-cert-auth: true
  trusted-ca-file: '/etc/kubernetes/pki/etcd/ca.pem'
  auto-tls: true
peer-transport-security:
  cert-file: '/etc/kubernetes/pki/etcd/etcd.pem'
  key-file: '/etc/kubernetes/pki/etcd/etcd-key.pem'
  peer-client-cert-auth: true
  trusted-ca-file: '/etc/kubernetes/pki/etcd/ca.pem'
  auto-tls: true
debug: false
log-package-levels:
log-outputs: [default]
force-new-cluster: false